package com.wzh.chatgpt.data.domain.weixin.service.validate;

import com.wzh.chatgpt.data.domain.weixin.service.IWeiXinValidateService;
import com.wzh.chatgpt.data.types.sdk.weixin.SignUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

/**
 * @author: wzh
 * time 2023 12 16 20 51
 **/
@Service
public class IWeiXinValidateServiceImpl implements IWeiXinValidateService {

    @Value("{wx.config.token}")
    private String token;

    @Override
    public boolean checkSign(String signature, String timestamp, String nonce) {
        return SignUtil.checkSignature(signature, timestamp, nonce);
    }
}
